<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<p:dialog header="导出表内数据" widgetVar="exportDialog" modal="true" closable="true" resizable="true" width="1200" height="600">
    <style>
        .ui-fileupload-files{
            display: inline-block;
        }
    </style>

    <p:outputPanel id="export-dialog">
        <div class="clearfix"
             style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%); margin-bottom: 10px">
            <p:toolbar>
                <f:facet name="right">
                    <p:commandButton value="查询" icon="fa fa-upload"
                                     onstart="PF('doing').show()"
                                     actionListener="#{imeiStatListBean.onExport}"
                                     ajax="false"
                                     oncomplete="PF('doing').hide()"/>
                </f:facet>
            </p:toolbar>
        </div>
        <div class="ui-g ui-fluid" style="padding-top: 30px;">
            <div class="ui-g-12">
                <div class="ui-g-12 card">
                    <div class="ui-g-1">
                        <p:outputLabel value="时间"/>
                    </div>
                    <div class="ui-g-3">
                        <p:calendar
                                styleClass="autoWidthCalendar"
                                value="#{imeiStatListBean.imeiExportRecord.createDate}"
                                locale="#{constants:get('LOCALE')}"
                                timeZone="#{constants:get('TIME_ZONE')}"
                                pattern="#{constants:get('DATE_FORMAT')}"/>
                    </div>
                    <div class="ui-g-1">
                        <p:outputLabel value="产品编号"/>
                    </div>
                    <div class="ui-g-3">
                        <p:selectOneMenu value="#{imeiStatListBean.imeiExportRecord.prdId}"
                                              updateLabel="true" multiple="true" filter="true"
                                              filterMatchMode="contains">
                            <f:selectItem itemLabel="请选择" itemValue=""
                                          noSelectionOption="true"/>
                            <f:selectItems
                                    value="#{imeiStatListBean.commProductIds}"
                                    var="product"
                                    itemLabel="#{product.name}(#{product.productId})" itemValue="#{product.productId}"/>
                        </p:selectOneMenu>
                    </div>
                    <div class="ui-g-1">
                        <p:outputLabel value="渠道编号"/>
                    </div>
                    <div class="ui-g-3">
                        <p:selectOneMenu value="#{imeiStatListBean.imeiExportRecord.channelCode}"
                                              updateLabel="true" multiple="true" filter="true"
                                              filterMatchMode="contains">
                            <f:selectItem itemLabel="请选择" itemValue=""
                                          noSelectionOption="true"/>
                            <f:selectItems
                                    value="#{imeiStatListBean.commProductChannels}"
                                    var="channel"
                                    itemLabel="#{channel.channelName}(#{channel.channelCode})" itemValue="#{channel.channelCode}"/>
                        </p:selectOneMenu>
                    </div>
                    <div class="ui-g-1">
                        <p:outputLabel value="上传文件"/>
                    </div>
                    <div class="ui-g-3">
                        <p:fileUpload fileUploadListener="#{imeiStatListBean.handleImportExcel}" mode="advanced"
                                      dragDropSupport="false" sizeLimit="#{constants:get('UPLOAD_FILE_SIZE')}"
                                      allowTypes="/(\.|\/)(xls|xlsx)$/" cancelLabel="取消" uploadLabel="上传" label="导入"/>
                    </div>
                </div>
            </div>
        </div>
    </p:outputPanel>
</p:dialog>

</html>
